home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98a.txt
/
000098_icon-group-sender _Thu Mar 5 08:20:56 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
5KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by baskerville.CS.Arizona.EDU (8.8.7/8.8.7) with SMTP id IAA29020
for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Thu, 5 Mar 1998 08:20:56 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA07306; Thu, 5 Mar 1998 08:20:55 -0700
From: gep2@computek.net
Date: Wed, 4 Mar 1998 21:10:40 -0600
Message-Id: <199803050310.VAA24705@axp.cmpu.net>
Mime-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Subject: Re: Icon translation
To: icon-group@optima.CS.Arizona.EDU
X-Mailer: SPRY Mail Version: 04.00.06.17
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Content-Length: 4089
> Frankly, I think one of the weaknesses of Icon is the lack of strong
typing - or what more accurately I would call "optional strong typing".
Icon already has declarations - they're just not used for data types. I
could imagine an Icon-like language that differed *only* in having
optional type declarations, with an "any" type that behaves just as Icon
variables now do. Such a language would, of course, have all the
elegant Icon syntax and control structures.
> Strong typing would achieve two things: it would provide protection
against a wide class of coding errors...
Well, if you're going to create the ugly thing that is strong typing in an
effort to "provide protection against a wide class of coding errors" then I
don't think it truly makes sense to stop at just whether something is numeric or
string.
The really serious way to protect against this type of coding errors involves
providing more complex rules regarding what kinds of values belong in a data
item... such as:
* contains a number between 1 and 7
* contains a string matching an entry in table T1
* contains a year (e.g. 1980-2060)
* contains a month number (1-12)
* contains a string matching either "*" or a key in ISAM file Y
Of course, it's generally easy enough to code up rules like that if you WANT
them... exactly like it being easy enough to code up type checking stuff, IF you
want it.
> ...and it would make efficient compilation possible without elaborate and
still incomplete dataflow analysis to determine run-time types.
There's nothing wrong with the "efficiency" of Icon's compilation... the
compiler is VERY quick, in fact.
Personally, I don't think that the big problem to the acceptance of Icon has
anything to do with its execution speed... sure, faster is most always better,
but I think there are other issues which ought to be addressed first.
> And were it optional, what would be lost?
Mainly, the OTHER things that could be done in less or equivalent development
time and which would go a lot further toward helping make Icon a more useful
programming tool. For example:
* ISAM file support and/or database-like features (named fields in disk file
records for example). Either as a built-in, or even just as an interface to an
existing database system (FoxPro, Access, Clipper, whatever). This would allow
Icon to have access to databases used in other pre-existing systems, and would
allow programs to be written and database structures and relationships changed
without invalidating previously written programs not using the new fields.
Business use of programs (and most others too, in truth) almost universally
requires efficient ISAM files and/or database access, and Icon presently doesn't
really have it.
* Improved support for using Icon for CGI scripting... for example, being
able to load and keep in memory a single, reusable copy of the interpreter so
that the only file needing to be fetched for executing a CGI script being the
(tiny) icode file. Or providing the necessary hooks to facilitate sending and
receiving E-mail, accessing news and FTP and Web servers, and the like.
> I won't claim that such a language would be Icon; only Icon is Icon.
But it's the language I'd very much like to have.
I think that strong and fixed typing is a plague, largely perpetrated by those
who haven't ever discovered the advantages of a programming language which HELPS
you rather than throwing rocks into your path. Of course, I realize that there
is no accounting for taste... I guess we'll just have to agree to disagree on
this point.
> By the way, were Icon++ (or Icon--, if you prefer) to be compiled into C
(the poor man's form of compilation), I would expect that it would *not*
use the C string type because of the problems with null characters.
Absolutely... the C string type is nearly useless for Icon's purposes. (And in
fact, isn't even all that great for C's purposes!)
Gordon Peterson
http://www.computek.net/public/gep2/
Support the Anti-SPAM Amendment! Join at http://www.cauce.org/